import request from '@/utils/request'

// 查询临工岗位列表
export function listTmppost(query) {
  return request({
    url: '/business/tmppost/list',
    method: 'get',
    params: query
  })
}
// 查询临工岗位列表
export function listLikeName(name) {
  let query = {
    "name" : name
  }
  return request({
    url: '/business/tmppost/list-like-name',
    method: 'get',
    params: query
  })
}

// 查询临工岗位详细
export function getTmppost(id) {
  return request({
    url: '/business/tmppost/' + id,
    method: 'get'
  })
}

// 新增临工岗位
export function addTmppost(data) {
  return request({
    url: '/business/tmppost',
    method: 'post',
    data: data
  })
}

// 修改临工岗位
export function updateTmppost(data) {
  return request({
    url: '/business/tmppost',
    method: 'put',
    data: data
  })
}

// 删除临工岗位
export function delTmppost(id) {
  return request({
    url: '/business/tmppost/' + id,
    method: 'delete'
  })
}

// 导出临工岗位
export function exportTmppost(query) {
  return request({
    url: '/business/tmppost/export',
    method: 'get',
    params: query
  })
}
